const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('Classification_table', {
    id: {
      autoIncrement: true,
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true
    },
    types_name: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "分类名称"
    },
    first_class_types: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "0动漫，1游戏"
    },
    secondary_type: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "二级分类id"
    },
    tips: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "简介"
    },
    type_url: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "图标地址"
    },
    Introduction: {
      type: DataTypes.STRING(255),
      allowNull: true,
      comment: "官方介绍地址，或本站资源"
    }
  }, {
    sequelize,
    tableName: 'Classification_table',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "id" },
        ]
      },
    ]
  });
};
